var ampq = require('amqplib');
var URL = require('url')

var xx = require('../config/gg.json')

console.log(xx)

var U = URL.format({
    protocol: 'amqp',
    slashes: true,
    hostname: '192.168.2.2',
    port: 8882,
    pathname: 'vhost',
    query: { username: 'admin', password: 'password' },
    auth: 'aa:bb'
})

ampq.connect()


console.log(U.toString())

var parts = URL.parse(U, true);

console.log(parts.pathname.substr(1), parts.query, parts.auth)